<%@ page contentType="text/html; charset=utf-8" language="java" import="java.sql.*" errorPage="" %>
<%@ page import="java.io.*"%>
<%@ page import="requestInterFace.Handle.userHandle"%>
<%@ page import="xml.response.*"%>
<%@ page import="xml.root"%>
<%@ page import="util.print.printLogCat"%>
<%@ page import="org.sql.table.*"%>
<%@ page import="xml.var"%>
<%@ page import="java.util.Vector"%>
<%@ page import="java.util.Enumeration"%>
<%@ page import="requestInterFace.UserInfoInterFace.*"%>
<%@ page import="jqgrid.jqgrid"%>
<%@ page import="util.check"%>
<%@ include file="../../util/paramPrint.jsp" %>
<%@ page trimDirectiveWhitespaces="true" %> 
<%   

    /*********** jqgrid ******************/
		jqgrid jq=new jqgrid();
		jq.setRows(request.getParameter(jqgrid._rows));
		jq.setSord(request.getParameter(jqgrid._sord));
		jq.setSortname(request.getParameter(jqgrid._sortname));
		jq.setPage(request.getParameter(jqgrid._page));
		jq.setOper(request.getParameter(jqgrid._oper));
		jq.setSearch(request.getParameter(jqgrid._search));
		/*************************************/
		
		
String User_ID = request.getParameter("User_ID");
String Login_Pwd = request.getParameter("Login_Pwd");
String NewPass = request.getParameter("NewPass");
String userType=(String)session.getAttribute("User_Type");
String userID=(String)session.getAttribute("User_ID");
root root=new root();
		userinfo1_1 user=new userinfo1_1();
		
		if(User_ID!=null&&(!User_ID.equals(""))){
		 user.addequwhile("User_ID"," = ",User_ID);
		}else{
			 root.setStatus("false");
			root.setMsg("请输入用户ID");
			PrintWriter pw = response.getWriter();
			pw.println(root.getXmlString());
			pw.flush();
			return ;
		}
	if(Login_Pwd!=null&&(!Login_Pwd.equals(""))){
		 user.addequwhile("Login_Pwd"," = ",Login_Pwd);
		}else{
			root.setStatus("false");
			root.setMsg("请输入用户密码");
			PrintWriter pw = response.getWriter();
			pw.println(root.getXmlString());
			pw.flush();
			return ;
		}
		if(NewPass!=null&&(!NewPass.equals(""))){
		// user.addequwhile("Login_Pwd"," = ",Login_Pwd);
		}else{
			root.setStatus("false");
			root.setMsg("请输入新密码不能为空");
			PrintWriter pw = response.getWriter();
			pw.println(root.getXmlString());
			pw.flush();
			return ;
		}
if(!user.Select()){
           root.setStatus("false");
			root.setMsg("用户ID密码不正确");
			PrintWriter pw = response.getWriter();
			pw.println(root.getXmlString());
			pw.flush();
			return ;
}

		if(Login_Pwd!=null&&(!Login_Pwd.equals(""))){
		  
		    user.setUpdateField("Login_Pwd",NewPass);
		  
		}
		int row=user.updata();
		root.setRecords(""+row);//设置当前查询到的记录数
		if(row>0){
			root.setStatus("true");
			root.setMsg("修改成功");
		}else{
			root.setStatus("false");
			root.setMsg("修改失败");
		}
		//printLogCat.printlnWriter(root.getXmlString());
		String rep=root.getXmlString();
%>
<%=rep%>
